1. Field of the Invention
The present invention relates to a disc recorder which records coded data to be reproduced in a real time (hereafter, referred to as a real time reproduction data) on a recordable disc-like recording medium and a method of recording the coded data. More particularly, the present invention relates to a disc recorder which records the real time reproduction data having a variable transfer rate, for example, as a result of a compressing and encoding operation, together with another data, on a recordable disc-like recording medium, and a method of recording the data.
2. Description of the Related Art
Conventionally, coded data to be reproduced in a real time(real time reproduction data), for example, such as an audio data, a video data and the like, has been popularly recorded on a recordable disc-like recording medium (hereafter, merely referred to as a disc medium).
Here, in the real time reproduction data, its transfer rate is made variable, for example, as a result of a compressing and encoding operation, in many cases. One of the real time reproduction data having the variable transfer rate is picture data which are compressed and coded by so-called MPEG system.
MPEG will be described below.
The MPEG is detailed in ISO-IEC 11172-2, ITU-T H.262/ISO-IEC 13818-2. Here, it is schematically explained. The MPEG is an abbreviation of a name of an organization (Moving Picture Experts Group) for investigating a moving picture coding standard, which was established in ISO/IEC JTC1/SC2 (International Organization for Standardization/International Electro-technical Commission Joint Technical Commission 1/Special Commission 2, namely, a current SC29), in 1988. This MPEG system prescribes a compression method referred to as MPEG 1 (MPEG Phase 1) or MPEG 2 (MPEG Phase 2). The MPEG 1 (MPEG Phase 1) is a standard targeted for a storage medium of about 1.5 Mbps, and inherits the basic techniques of JPEG intended to encode a still picture and H.261 (standardized in accordance with CCITT, SGXV and a current ITU-T SG15) intended to compress a moving picture having a low transfer rate for a video conference and a video telephone in ISDN, thereby introducing new technology for the storage medium. They are established as ISO/IEC 11172 in August, 1993.
The MPEG is prepared by the combination of several techniques. In the MPEG, basically, a picture signal decoded by a motion compensation and prediction is subtracted from an input picture signal to thereby reduce a portion of a temporal redundancy.
There are three modes of direction of prediction as basic modes, namely, a mode to carry out a prediction from a previous picture, a mode to carry out a prediction from a future picture, and a mode to carry out a prediction from both previous and future pictures. Also, these modes can be switched and used for each macro block (MB) of 16 pixelsxc3x9716 pixels. The direction of prediction is determined in accordance with a picture type (Picture_Type) given to an input picture. There are three picture types, namely, Predictive-coded picture (P-picture), Bidirectionally predictive-coded picture (B-picture), and Intra-coded picture (I-picture). With regard to the P-picture (Predictive-coded picture), there are two modes of a mode to encode a current macro block by predicting based on a previous picture and a mode to independently encode a current macro block without the prediction. With regard to the B-picture (Bidirectionally predictive-coded picture), there are four modes, namely, a mode to carry out the prediction based on the future picture, a mode to carry out the prediction based on the previous picture, a mode to carry out the prediction based on both the previous and future pictures and a mode to independently encode without the prediction. With regard to the I-picture (Intra-coded picture), all macro blocks are independently coded. Since the I-picture stands for intra-coded picture, the Predictive-coded picture and the Bidirectionally predictive-coded picture can be called as non-intra-coded picture.
In motion compensation, a pattern matching is performed on motion areas for each macro block to thereby detect motion vectors at a half pel accuracy. Then, the prediction is done after the macro block is shifted by an amount corresponding to the size of the detected motion vector. The motion vectors contain a motion vector in horizontal direction and a motion vector in vertical direction. The motion vectors are transmitted as an addition information for a macro block together with a MC (Motion Compensation) mode indicative of a basement of the prediction.
Pictures between an I-picture and the next I-picture are referred to as GOP (Group Of Picture). One GOP typically includes about 15 pictures, when the abbreviation GOP is used in a field of storage medium.,
FIG. 1 shows the basic configuration of a video encoder for compressing and encoding video data, among MPEG encoders for compressing and encoding video data and audio data by using the MPEG system.
In FIG. 1, an input digital picture signal is sent to an input terminal 101. This input picture signal is sent to an arithmetic unit 102 and a motion compensation/prediction unit 111 as described later.
The arithmetic unit 102 calculates a difference between a picture signal decoded by the motion compensation/prediction unit 111 and the input picture signal. The differential picture signal is sent to a DCT(Discrete Cosine Transform) unit 103.
The DCT unit 103 performs an orthogonal transform on the sent differential picture signal. Here, DCT (Discrete Cosine Transform) implies an orthogonal transform in which an integral transform with a cosine function as an integral core is converted into a discrete transform to finite space. In the MPEG, a two-dimensional DCT is performed on a DCT block of 8xc3x978 obtained by dividing the macro block into 4 sections. Typically, the video signal includes a large amount of low frequency components and a little amount of high frequency components. Therefore, the execution of DCT causes coefficients to be concentrated on the low frequency area. The data (DCT coefficients) obtained by the DCT unit 103 are sent to a quantizing unit 104.
The quantizing unit 104 quantizes the DCT coefficients from the DCT unit 103. In this quantization in the quantizing unit 104, the DCT coefficients are divided by quantization values, which are obtained by weighting a two-dimensional frequency of 8xc3x978 referred to as a quantization matrix in accordance with visual characteristic and then scalar-multiplying the weighted values by a quantization scale. Meanwhile, when the coded data encoded by this video encoder are decoded and inversely quantized by a decoder (expanding and decoding apparatus) in future, values approximating to the original DCT coefficients can be obtained by multiplying the coded data by the quantization values used in the video encoder. The data quantized by the quantizing unit 104 are sent to a variable-length encoding (VLC) unit 105.
The VLC unit 105 performs variable length encoding on the quantized data from the quantizing unit 104. The VLC 105 encodes by using DPCM (Differential Pulse Code Modulation) that is one of predictive encodings, for direct current (DC) components of the quantized values. On the other hand, the VLC unit 105 performs on an alternating current (AC) components the so-called Huffman encode, which carries out a so-called zigzag scan from the low frequency area to the high frequency area, and then uses a run length of zero and values of effective coefficients as one event, and further assigns the events having higher occurrence possibilities with codes having shorter length. Also, information of a prediction mode and motion vectors is sent from the motion compensation/prediction unit 111 to the VLC 105. The VLC unit 105 outputs the information of the prediction mode and the motion vectors together with the variable-length coded data as the addition information of the macro block. The data after the execution of the variable-length encoding in the VLC unit 105 are sent to a buffer memory 106.
The buffer memory 106 transiently stores therein the variable-length coded data from the VLC unit 105. After that, the coded data (a coded bit stream) read out from the buffer memory 106 at a predetermined transfer rate are outputted from an output terminal 113.
On the other hand, the picture data quantized by the quantizing unit 104 are also sent to an inverse-quantizing unit 107.
The inverse-quantizing unit 107 inversely quantizes the quantization data from the quantizing unit 104. The DCT coefficient data generated by this inverse quantization are sent to an inverse DCT unit 108.
The inverse DCT unit 108 performs an inverse DCT on the DCT coefficient data from the inverse-quantizing unit 107, and then sends to an arithmetic unit 109.
The arithmetic unit 109 adds a predictive differential picture from the motion compensation/prediction unit 111 to an output signal of the inverse DCT unit 108. Accordingly, a picture signal is restored.
The restored picture signal, after transiently stored in a picture memory 110, is read out and sent to the motion compensation/prediction unit 111.
The picture signal sent to the motion compensation/prediction unit 111 from the picture memory 110 is used to generate a coded picture as a reference in order to calculate the differential picture in the arithmetic unit 102.
The motion compensation/prediction unit 111 detects the motion vectors from the input picture signal, and shifts the picture by an amount corresponding to the motion of the detected motion vector, and then carries out the prediction. The predictive differential picture signal generated by the prediction is sent to the arithmetic units 102, 109. Also, the motion vector detected by the motion compensation/prediction unit 111, together with the information of the prediction mode (MC mode), is sent to the VLC 105.
It should be noted that the coding of the differential picture as above-mentioned is performed only for P-picture and B-picture and that, with respect to I-picture, the input picture signal thereof is encoded as it is.
Here, the video coded bit stream outputted from the output terminal 113 has a code amount of a variable length for each picture. This is because the MPEG system uses the information transform, such as the DCT, the quantization and the Huffman encoding, and at the same time, adaptationally changes a code amount distributed for each picture in order to improve the quality of picture. This is also because, since the MPEG system performs motion compensation/prediction, the entropy of the coded picture itself is largely changed such that, in a certain case, the input picture as it is is encoded (a case of I-picture) while in other cases, the differential picture which is a differential of predictive images is encoded (cases of P- and B-pictures).
Thus, the encoder of FIG. 1 controls the code amount while complying with a limit of a buffer, in accordance with an entropy ratio of the coded picture.
That is, a code amount controller 112 in the encoder of FIG. 1 monitors a relation between the generated-code amount and a coding rate, sets a target code amount to be less than a predetermined amount of a buffer, feeds the target code amount back to the VLC unit 105, and also calculates an error code amount that is a difference between the target code amount and the generated-code amount for each macro block, generates a code amount control signal corresponding to the error code amount, and feeds back to the quantizing unit 104, and accordingly controls the generated-code amount. The code amount control signal fed back to the quantizing unit 104 for the sake of the control of the code amount is a signal to control the quantization value (the quantization scale) in the quantizing unit 104. For example, the quantization scale in the quantizing unit 104 is controlled to be large in order to decrease the generated-code amount, or it is controlled to be large in order to increase the generated-code amount.
In the MPEG standard, a virtual buffer memory referred to as a VBV buffer is prescribed such that in a decoding operation of a decoder (a video decoder), an occupation amount of a decoder buffer memory provided in the video decoder does not overflow or underflow. The generated-code amount in actual encoding is controlled in accordance with the occupation amount of the VBV buffer.
That is, the MPEG standard uses a VBV buffer model in which data are input into a VBV buffer at constant speed under a condition of an upper limit value of a maximum buffer capacity of a decoder buffer memory provided in the video decoder and when a predetermined amount of data is stored, the predetermined amount of the data is instantly decoded within a predetermined period of time (a unit of {fraction (1/29.97)} seconds, in a case of a video signal of NTSC). Thus, the MPEG standard prescribes that the coding is controlled such that the VBV buffer does not overflow or underflow.
Accordingly, the conformity to this standard (VBV buffer standard) enables a rate within the VBV buffer to be an apparently fixed transfer rate, although the rate is locally changed, if an observation time is made longer (namely, it is apparently encoded at a fixed coding rate). The MPEG standard defines such an apparently fixed transfer rate as a fixed rate.
FIG. 2 shows a transition example of a change in the occupation amount of the VBV buffer. A vertical axis of FIG. 2 denotes an occupation amount of a VBV buffer (the maximum capacity implies the MAX value), and a horizontal axis denotes a time. An inclination of a straight line indicative of the change in the buffer occupation amount of FIG. 2 corresponds to a transfer rate, namely, a coding rate.
That is, in FIG. 2, data are inputted into the VBV buffer at a constant transfer rate. The data are stored for {fraction (1/29.97)} seconds, for example, in the case of the video signal of the NTSC (National Television System Committee). After that, the data are instantly removed from the VBV buffer.
Additionally, the relation between the occupation amount of the decoder buffer memory provided in the video decoder and the occupation amount of the VBV buffer at the time of the encoding operation becomes inversely proportional. Thus, if the generated code amount is, for example, small in the case of the fixed transfer rate, the buffer occupation amount of the VBV buffer becomes at an overflow state, in which, in other words, the amount keeps to be the MAX value (the upper limit value).
As mentioned above, in the case of the fixed transfer rate, for example, if the generated code amount becomes small and thus the occupation amount of the VBV buffer becomes at the state in which the amount keeps to be the upper limit (the MAX value), the buffer occupation amount becomes small in the decoder buffer memory on the side of the video decoder. Thus, the underflow of the decoder buffer memory may undesirably occur.
For this reason, it is conventionally designed such that if the occupation amount of the VBV buffer reaches the upper limit, for example, an invalid bit is added into the coded bit stream so that the VBV buffer may not overflow, namely, the decode buffer memory of the video decoder may not underflow.
Also, the above-mentioned definition of the fixed transfer rate in the MPEG is expanded such that if the occupation rate of the VBV buffer reaches the upper limit, the video decoder stops reading out the data from the disc medium, and thereby the decode buffer memory of the video decoder may not underflow, namely, the VBV buffer may not overflow.
In addition, as mentioned above, when the generated code amount is, for example, very small to thereby result in the overflow of the VBV buffer (the underflow of the decode buffer memory), the above-mentioned control for adding the invalid bit into the coded bit stream is not required if the video decoder side stops reading out the data from the disc medium. Thus, in this case, the code amount may be controlled such that only the underflow of the VBV buffer does not occur.
FIG. 3 shows the basic configuration of the video decoder for decoding the coded data encoded by the video encoder shown in FIG. 1.
In FIG. 3, coded data read out directly from the encoder or read out from the disc medium is sent to an input terminal 121. The coded data are sent to a variable-length decoding (VLD) unit 122.
The VLD unit 122 carries out a variable length decoding implying the process reverse to the variable length encoding in the VLC unit 105 of FIG. 1. Data generated by the variable length decoding corresponds to data obtained by adding information of motion vectors and a prediction mode to quantization data that are the input to the VLC device 105 of FIG. 1. The quantization data generated by the variable length decoding in the VLD unit 122 are sent to an inverse quantizing unit 123.
The inverse quantizing unit 123 inversely quantizes the quantization data from the VLD unit 122. The inversely quantized data corresponds to DCT coefficients that are an input to a quantizing unit 104 of FIG. 1. The DCT coefficient data generated by the inverse quantization in the inverse quantizing unit 123 are sent to an inverse DCT unit 124. The information of the motion vectors and the prediction mode is sent from the inverse quantizing unit 123 to a motion compensation/prediction unit 127.
The inverse DCT unit 124 performs the inverse DCT on the DCT coefficients from the inverse quantizing unit 123. The data obtained by the inverse DCT in the inverse DCT unit 124 corresponds to a differential picture signal that is an input to a DCT unit 103 of FIG. 1. The differential picture signal obtained by the inverse DCT in the inverse DCT unit 124 is sent to an arithmetic unit 125.
The arithmetic unit 125 adds a predictive differential picture from the motion compensation/prediction unit 127 to the differential picture signal from the inverse DCT unit 124, which accordingly restores decoded data, namely, a picture signal. This restored picture signal substantially corresponds to an input picture signal to an input terminal 101 of FIG. 1. The restored picture signal (decoded data) is outputted from an output terminal 128, and simultaneously sent to the motion compensation/prediction unit 127 after transiently stored in a picture memory 126.
The motion compensation/prediction unit 127 generates the predictive differential picture from the picture signal sent from a picture memory 126, in accordance with the motion vectors and the prediction mode, and then sends the predictive differential picture to the arithmetic unit 125.
In the meantime, for example, when the data to be reproduced in a real time such as an audio data, a video data and the like (a real time reproduction data) are recorded on a recordable disc medium, the real time reproduction data are conventionally recorded after a continuous area on which the data can be recorded is reserved in advance in the disc medium.
However, for example, if another data have been already scattered and recorded on the disc medium, the continuous area where the real time reproduction data can be recorded can not be reserved in advance in the disc medium. Thus, there may be a case that it can not be recorded.
Also, for example, when defect caused by flaw and the like is present on the disc medium, the recording operation is done in which the defect portion is skipped. However, in this case, the physical arrangement of the real time reproduction data is discontinuous on the disc medium. Thus, in order to sufficiently absorb a time lag resulting from the discontinuous portion of the real time reproduction data, it is necessary to insure a transfer rate sufficiently higher than a transfer rate in the real time reproduction, namely, a sufficiently higher rotation speed of the disc medium.
Also, for example, at a time of recording on the disc medium a real time reproduction data, in which a transfer rate is made variable by the compressing and encoding operation such as the above-mentioned MPEG method, if the real time reproduction data are inputted to a disc recorder, for example, at a transfer rate equal to or greater than a particular rate, for example, if the real time reproduction data are inputted at a variable transfer rate including a high transfer rate with which the disc recorder can not cope, there may be a case that the continuous reproduction of the recorded data can not be insured. That is, when the real time reproduction data at the variable transfer rate are recorded on the disc medium, a data having the high transfer rate can not be recorded. As a result, if a part of the real time reproduction data is largely lost, the data can not be decoded at a time of a later decoding operation. This results in a problem that an error is largely propagated to thereby cause the data reproduction to be severely disturbed.
The present invention is proposed in view of the above mentioned circumstances. It is therefore an object of the present invention to provide a disc recorder and method, which when a real time reproduction data are recorded together with another data on a recordable disc medium, can surely record the real time reproduction data together with another data on the recordable disc medium, and can ensure the reproduction of the real time reproduction data, and can avoid the occurrence of the disturbance in the data reproduction.
In order to attain the above-mentioned object, according to an aspect of the present invention, there is provided a disc recorder for recording coded data to be reproduced in real time, on a recordable disc-shaped recording medium, the disc recorder comprising: a peak rate detecting means for obtaining coding rate information of the coded data to thereby detect a maximum coding rate that is a reproduction peak rate of the coded data; a recording start position detecting means for detecting a recording start position of the disc-shaped recording medium; a discontinuous length detecting means which, supposing that the coded data are recorded on the disc-shaped recording medium, detects a length of a discontinuous portion of the coded data that are suppositionlly recorded; a determining means for determining a possibility of continuous reproduction of the coded data that are suppositionlly recorded, based on at least information of the recording start position, the length of the discontinuous portion and the maximum coding rate; and a control means for recording the coded data on the disc-shaped recording medium when it is determined that the coded data that are suppositionlly recorded can be continuously reproduced as the determination result of the determining means and for changing the recording start position when it is determined that the coded data that are suppositionlly recorded can not be continuously reproduced.
Also, in order to attain the above-mentioned object, according to another aspect of the present invention, there is provided a disc recorder for recording coded data to be reproduced in real time, on a recordable disc-shaped recording medium, the disc recorder comprising: a peak rate detecting means for obtaining coding rate information of the coded data to thereby detect a maximum coding rate that is a reproduction peak rate of the coded data; a recording start position detecting means for detecting a recording start position of the disc-shaped recording medium; a discontinuous length detecting means which, supposing that the coded data are recorded on the disc-shaped recording medium, detects a length of a discontinuous portion of the coded-data that are suppositionlly recorded; a determining means for determining a possibility of continuous reproduction of the coded data that are suppositionlly recorded, based on at least information of the recording start position, the length of the discontinuous portion and the maximum coding rate; and a control means for recording the coded data on the disc-shaped recording medium when it is determined that the coded data that are suppositionlly recorded can be continuously reproduced as the determination result of the determining means and for rearranging recorded areas on the disc-shaped recording medium when it is determined that the coded data that are suppositionlly recorded can not be continuously reproduced.
According to the present invention, for example, in the case that real time reproduction data is to be recorded together with another data on a recordable disc medium, the real time reproduction data can be surely recorded together with another data on the recordable disc medium, and it is also possible to ensure the reproduction of the real time reproduction data, and further possible to avoid the occurrence of the disturbance in the data reproduction.
The preferred embodiment of the present invention further comprises a message output means for outputting a message indicating that the coded data can not be recorded, after the determining means has repeatedly determined a predetermined number of times that the coded data that are suppositionlly recorded can not be continuously reproduced.
According to this embodiment, for example, it is possible to avoid the trouble in which the real time reproduction data is recorded without ensuring the continuous reproduction and this results in the data loss at the time of the reproduction and thereby the data reproduction is disturbed.
Also, in order to attain the above-mentioned object, according to still another aspect of the present invention, there is provided a disc recording method for recording coded data to be reproduced in real time, on a recordable disc-shaped recording medium, the method comprising the steps of: detecting a maximum coding rate that is a reproduction peak rate of the coded data based on coding rate information of the coded data; detecting a recording start position of the disc-shaped recording medium; supposing that the coded data are recorded on the disc-shaped recording medium; detecting a length of a discontinuous portion of the coded data that are suppositionlly recorded; determining a possibility of continuous reproduction of the coded data that are suppositionlly recorded, based on at least information of the recording start position, the length of the discontinuous portion and the maximum coding rate; recording the coded data on the disc-shaped recording medium when it is determined that the coded data that are suppositionlly recorded can be continuously reproduced as the determination result; and changing the recording start position when it is determined that the coded data that are suppositionlly recorded can not be continuously reproduced.
Also, in order to attain the above-mentioned object, according to yet another aspect of the present invention, there is provided a disc recording method for recording coded data to be reproduced in real time, on a recordable disc-shaped recording medium, the method comprising the steps of: detecting a maximum coding rate that is a reproduction peak rate of the coded data based on coding rate information of the coded data; detecting a recording start position of the disc-shaped recording medium; supposing that the coded data are recorded on the disc-shaped recording medium; detecting a length of a discontinuous portion of the coded data that are suppositionlly recorded; determining a possibility of continuous reproduction of the coded data that are suppositionlly recorded, based on at least information of the recording start position, the length of the discontinuous portion and the maximum coding rate; recording the coded data on the disc-shaped recording medium when it is determined that the coded data that are suppositionlly recorded can be continuously reproduced as the determination result; and rearranging recorded areas on the disc-shaped recording medium when it is determined that the coded data that are suppositionlly recorded can not be continuously reproduced.
According to the present invention, for example, in the case that real time reproduction data is to be recorded together with another data on a recordable disc medium, the real time reproduction data can be surely recorded together with another data on the recordable disc medium, and it is also possible to ensure the reproduction of the real time reproduction data, and further possible to avoid the occurrence of the disturbance in the data reproduction.
The preferred embodiment of the present invention further comprises the step of outputting a message indicating that the coded data can not be recorded, after it has been repeatedly determined a predetermined number of times that the coded data that are suppositionlly recorded can not be continuously reproduced.
According to this embodiment, for example, it is possible to avoid the trouble in which the real time reproduction data is recorded without ensuring the continuous reproduction and this results in the data loss at the time of the reproduction and thereby the data reproduction is disturbed.
The nature, principle and utility of the invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings.